]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Keep popup open on refresh
authorRay Strode <rstrode@redhat.com>
Thu, 18 Jul 2019 15:13:27 +0000 (11:13 -0400)
committerRay Strode <halfline@gmail.com>
Tue, 23 Jul 2019 14:53:24 +0000 (14:53 +0000)
If the list of applications is refreshed we currently close
the open app folder.

This commit adds logic to reopen the app folder on reload.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/628

js/ui/appDisplay.js

index 30d565bc1ed05d033fa1d51cc9fdbe64b93bcf21..03881ca3f9afd903c9aa0f1531ada9c0b7fea9ac 100644 (file)
@@ -330,6 +330,21 @@ var AllView = class AllView extends BaseAppView {
         super.removeAll();
     }
 
+    _redisplay() {
+        let openFolderId = null;
+        if (this._displayingPopup && this._currentPopup)
+            openFolderId = this._currentPopup._source.id;
+
+        super._redisplay();
+
+        if (openFolderId) {
+            let [folderToReopen] = this.folderIcons.filter(folder => folder.id == openFolderId);
+
+            if (folderToReopen)
+                folderToReopen.open();
+        }
+    }
+
     _itemNameChanged(item) {
         // If an item's name changed, we can pluck it out of where it's
         // supposed to be and reinsert it where it's sorted.